package com.neusoft.adminweb.service.impl;

import com.neusoft.adminweb.dao.UmsAdminRoleRelationDao;
import com.neusoft.adminweb.entity.UmsAdmin;
import com.neusoft.adminweb.entity.UmsAdminRoleRelation;
import com.neusoft.adminweb.service.UmsAdminRoleRelationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 后台用户和角色关系表(UmsAdminRoleRelation)表服务实现类
 *
 * @author makejava
 * @since 2020-11-20 15:14:42
 */
@Service("umsAdminRoleRelationService")
public class UmsAdminRoleRelationServiceImpl implements UmsAdminRoleRelationService {
    @Resource
    private UmsAdminRoleRelationDao umsAdminRoleRelationDao;

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public UmsAdminRoleRelation queryById(Long id) {
        return this.umsAdminRoleRelationDao.queryById(id);
    }

    @Override
    public List<UmsAdminRoleRelation> queryPageByArgs(UmsAdminRoleRelation args) {
        return umsAdminRoleRelationDao.queryPageByArgs(args);
    }

    /**
     * 新增数据
     *
     * @param admin 实例对象
     * @return 实例对象
     */
    @Override
    public boolean insert(UmsAdminRoleRelation admin) {
        return this.umsAdminRoleRelationDao.insert(admin);
    }

    /**
     * 修改数据
     *
     * @param admin 实例对象
     * @return 实例对象
     */
    @Override
    public boolean update(UmsAdminRoleRelation admin) {
        return this.umsAdminRoleRelationDao.update(admin);
    }

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Integer id) {
        return this.umsAdminRoleRelationDao.deleteById(id);
    }
}